package com.fufu.pojo;


import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 文件数量统计
 * @TableName file_count_number
 */
@TableName(value ="file_count_number")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FileCountNumber implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 目录
     */
    private String dirctory;

    /**
     * 文件数量
     */
    private Integer countNum;

    /**
     * 文件后缀
     */
    private String fileType;

    /**
     * 创建日期
     */
    private Date createTime;

    /**
     * 创建用户
     */
    private String createUser;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 修改用户
     */
    private String updateUser;

    /**
     * 是否使用1：使用；0：停用
     */
    private Integer inUser;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 1：删除；0未删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public FileCountNumber(String dirctory, Integer inUser, String updateUser, Date updateTime, Date createTime, String createUser, String fileType, Integer countNum) {
        this.dirctory = dirctory;
        this.inUser = inUser;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.createTime = createTime;
        this.createUser = createUser;
        this.fileType = fileType;
        this.countNum = countNum;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FileCountNumber other = (FileCountNumber) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDirctory() == null ? other.getDirctory() == null : this.getDirctory().equals(other.getDirctory()))
            && (this.getCountNum() == null ? other.getCountNum() == null : this.getCountNum().equals(other.getCountNum()))
            && (this.getFileType() == null ? other.getFileType() == null : this.getFileType().equals(other.getFileType()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getInUser() == null ? other.getInUser() == null : this.getInUser().equals(other.getInUser()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDirctory() == null) ? 0 : getDirctory().hashCode());
        result = prime * result + ((getCountNum() == null) ? 0 : getCountNum().hashCode());
        result = prime * result + ((getFileType() == null) ? 0 : getFileType().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getInUser() == null) ? 0 : getInUser().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", dirctory=").append(dirctory);
        sb.append(", countNum=").append(countNum);
        sb.append(", fileType=").append(fileType);
        sb.append(", createTime=").append(createTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", inUser=").append(inUser);
        sb.append(", sort=").append(sort);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}